package cn.j0n4than.accountingtool.controller.api.auth;

import cn.j0n4than.accountingtool.controller.common.BaseController;
import com.fasterxml.jackson.core.JsonProcessingException;

/**
 * 授权控制器基类
 *
 * @author jonathan
 */
public class AuthBaseController extends BaseController {

    /**
     * 对象转为JSON字符串
     *
     * @param obj 对象
     * @return json string
     */
    protected String objToJsonStr(Object obj) throws JsonProcessingException {
        return this.objectMapper.writeValueAsString(obj);
    }
}
